package com.btkjgc.framework.report;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Created by Rong on 2015/4/7.
 */
public class Toolbar
{
	public static Integer HIDEN_INPUT = 0;
	public static Integer LABEL = 1;
	public static Integer SELECT = 2;
	public static Integer DATE = 3;
	public static Integer BUTTON = 4;
	public static Integer INPUT = 5;
	public static Integer RADIO_BUTTON = 6;
	public static Integer SORT_LABEL_DIV = 7;// 放置排序标签的div
												// 参数1,参数2,(逗号之间的文本和表头的一致)
	Integer type;// 0 -隐藏输入框 1 label ，2 select，3 data，4 button
	String uiName = "";
	List<String> selectList = new ArrayList<String>();// 下拉列表显示的选项
	String uiValue = "";// 组件显示的文本（如果需要的话）
	String url = "";// Button使用的url
	List<RadioItem> radioList = new ArrayList<RadioItem>();// 单选按钮的选项列表

	public Toolbar()
	{
		SimpleDateFormat sdf = new SimpleDateFormat("HHmmssSSS");
		this.setUiName("text" + sdf.format(new Date())
				+ (int) (Math.random() * 1000));
	}

	public Toolbar(Integer type, String uiName, List<String> selectList,
			String uiValue, String url)
	{
		this.type = type;
		this.uiName = uiName;
		this.selectList = selectList;
		this.uiValue = uiValue;
		this.url = url;
	}

	public Integer getType()
	{
		return type;
	}

	public void setType(Integer type)
	{
		this.type = type;
	}

	public String getUiName()
	{
		return uiName;
	}

	public void setUiName(String uiName)
	{
		this.uiName = uiName;
	}

	public List<String> getSelectList()
	{
		return selectList;
	}

	public void setSelectList(List<String> selectList)
	{
		this.selectList = selectList;
	}

	public String getUrl()
	{
		return url;
	}

	public void setUrl(String url)
	{
		this.url = url;
	}

	public String getUiValue()
	{
		return uiValue;
	}

	public void setUiValue(String uiValue)
	{
		this.uiValue = uiValue;
	}

	public List<RadioItem> getRadioList()
	{
		return radioList;
	}

	public void setRadioList(List<RadioItem> radioList)
	{
		this.radioList = radioList;
	}

}
